home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Fun House 8
/
CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso
/
pc
/
mac
/
__the_sc
/
mr._mo
/
background_2797.txt
next >
Wrap
Text File
|
1989-04-17
|
2KB
|
115 lines
-- background: 2797 from stack: in._mo
-- bmap block id: 0
-- flags: 4000
-- background id: 0
-- name:
----- HyperTalk script -----
on getProb
global sel, skill, answer, n, snd1
if skill<4
then
if skill=1 then put 10 into t
if skill=2 then put 100 into t
if skill=2 and sel<>3 then put 10 into t
if skill=3 then put 1000 into t
put 2*t into bug
put the random of bug into a
put the random of bug into b
put a-t into a
put b-t into b
if a=0 then put 3 into a
if b=0 then put 2 into b
if skill=1 then
put abs(a) into a
put abs(b) into b
if b>a then
put a into temp
put b into a
put temp into b
end if
end if
end if
if skill>=4
then
if skill=4 then put 10000 into t else put 100000 into t
put the random of t into a
put the random of t into b
put the random of 3 into c
put a/(10^c) into a
put b/(10^c) into b
end if
if sel=1
then
put a&" + "&b into card field 2
put a+b into answer
put "plus" into snd1
end if
if sel=2
then
put a&" - "&b into card field 2
put a-b into answer
put "minus" into snd1
end if
if sel=3
then
put a&" x "&b into card field 2
put a*b into answer
put "times" into snd1
end if
if sel=4
then
if a=0 then put 2 into a
if b=0 then put 3 into b
put a*b into c
put c into a
put a/b into answer
put a&" √∑ "&b into card field 2
put "divide" into snd1
end if
sayProb
end getProb
on sayProb
global snd1
repeat with x=1 to the number of chars in word 1 of card field 2
get char x of word 1 of card field 2
put it into y
if y=0 then play "10" f#3w
if y="." then play "point" f#3w
if y="-" then
play "negative"
wait 75 ticks
end if
play y f#3w
end repeat
play snd1 f#3w
if snd1="divide" then wait 5 seconds -- has trouble with this one.
repeat with x=1 to the number of chars in word 3 of card field 2
get char x of word 3 of card field 2
put it into y
if y=0 then play "10" f#3w
if y="." then play "point" f#3w
if y="-" then
play "negative"
wait 75 ticks
end if
play y f#3w
end repeat
play "equals" f#3w
play "bell" f#3w
end sayProb